3.1.73 \(\int (a+b \log (c x^n)) \log (d (e+f x)^m) \, dx\) [73]

Optimal. Leaf size=117 \[ 2 b m n x-m x \left (a+b \log \left (c x^n\right )\right )-\frac {b n (e+f x) \log \left (d (e+f x)^m\right )}{f}-\frac {b e n \log \left (-\frac {f x}{e}\right ) \log \left (d (e+f x)^m\right )}{f}+\frac {(e+f x) \left (a+b \log \left (c x^n\right )\right ) \log \left (d (e+f x)^m\right )}{f}-\frac {b e m n \text {Li}_2\left (1+\frac {f x}{e}\right )}{f} \]

[Out]

2*b*m*n*x-m*x*(a+b*ln(c*x^n))-b*n*(f*x+e)*ln(d*(f*x+e)^m)/f-b*e*n*ln(-f*x/e)*ln(d*(f*x+e)^m)/f+(f*x+e)*(a+b*ln
(c*x^n))*ln(d*(f*x+e)^m)/f-b*e*m*n*polylog(2,1+f*x/e)/f

________________________________________________________________________________________

Rubi [A]
time = 0.10, antiderivative size = 117, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 8, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.381, Rules used = {2436, 2332, 2417, 2458, 45, 2393, 2354, 2438} \begin {gather*} -\frac {b e m n \text {PolyLog}\left (2,\frac {f x}{e}+1\right )}{f}+\frac {(e+f x) \left (a+b \log \left (c x^n\right )\right ) \log \left (d (e+f x)^m\right )}{f}-m x \left (a+b \log \left (c x^n\right )\right )-\frac {b n (e+f x) \log \left (d (e+f x)^m\right )}{f}-\frac {b e n \log \left (-\frac {f x}{e}\right ) \log \left (d (e+f x)^m\right )}{f}+2 b m n x \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a + b*Log[c*x^n])*Log[d*(e + f*x)^m],x]

[Out]

2*b*m*n*x - m*x*(a + b*Log[c*x^n]) - (b*n*(e + f*x)*Log[d*(e + f*x)^m])/f - (b*e*n*Log[-((f*x)/e)]*Log[d*(e +
f*x)^m])/f + ((e + f*x)*(a + b*Log[c*x^n])*Log[d*(e + f*x)^m])/f - (b*e*m*n*PolyLog[2, 1 + (f*x)/e])/f

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 2332

Int[Log[(c_.)*(x_)^(n_.)], x_Symbol] :> Simp[x*Log[c*x^n], x] - Simp[n*x, x] /; FreeQ[{c, n}, x]

Rule 2354

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/((d_) + (e_.)*(x_)), x_Symbol] :> Simp[Log[1 + e*(x/d)]*((a +
b*Log[c*x^n])^p/e), x] - Dist[b*n*(p/e), Int[Log[1 + e*(x/d)]*((a + b*Log[c*x^n])^(p - 1)/x), x], x] /; FreeQ[
{a, b, c, d, e, n}, x] && IGtQ[p, 0]

Rule 2393

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol] :> Wit
h[{u = ExpandIntegrand[a + b*Log[c*x^n], (f*x)^m*(d + e*x^r)^q, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b, c,
d, e, f, m, n, q, r}, x] && IntegerQ[q] && (GtQ[q, 0] || (IntegerQ[m] && IntegerQ[r]))

Rule 2417

Int[Log[(d_.)*((e_) + (f_.)*(x_)^(m_.))^(r_.)]*((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.), x_Symbol] :> With[
{u = IntHide[Log[d*(e + f*x^m)^r], x]}, Dist[(a + b*Log[c*x^n])^p, u, x] - Dist[b*n*p, Int[Dist[(a + b*Log[c*x
^n])^(p - 1)/x, u, x], x], x]] /; FreeQ[{a, b, c, d, e, f, r, m, n}, x] && IGtQ[p, 0] && RationalQ[m] && (EqQ[
p, 1] || (FractionQ[m] && IntegerQ[1/m]) || (EqQ[r, 1] && EqQ[m, 1] && EqQ[d*e, 1]))

Rule 2436

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.), x_Symbol] :> Dist[1/e, Subst[Int[(a + b*Log[c*
x^n])^p, x], x, d + e*x], x] /; FreeQ[{a, b, c, d, e, n, p}, x]

Rule 2438

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> Simp[-PolyLog[2, (-c)*e*x^n]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rule 2458

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*((f_.) + (g_.)*(x_))^(q_.)*((h_.) + (i_.)*(x_))
^(r_.), x_Symbol] :> Dist[1/e, Subst[Int[(g*(x/e))^q*((e*h - d*i)/e + i*(x/e))^r*(a + b*Log[c*x^n])^p, x], x,
d + e*x], x] /; FreeQ[{a, b, c, d, e, f, g, h, i, n, p, q, r}, x] && EqQ[e*f - d*g, 0] && (IGtQ[p, 0] || IGtQ[
r, 0]) && IntegerQ[2*r]

Rubi steps

\begin {align*} \int \left (a+b \log \left (c x^n\right )\right ) \log \left (d (e+f x)^m\right ) \, dx &=-m x \left (a+b \log \left (c x^n\right )\right )+\frac {(e+f x) \left (a+b \log \left (c x^n\right )\right ) \log \left (d (e+f x)^m\right )}{f}-(b n) \int \left (-m+\frac {(e+f x) \log \left (d (e+f x)^m\right )}{f x}\right ) \, dx\\ &=b m n x-m x \left (a+b \log \left (c x^n\right )\right )+\frac {(e+f x) \left (a+b \log \left (c x^n\right )\right ) \log \left (d (e+f x)^m\right )}{f}-\frac {(b n) \int \frac {(e+f x) \log \left (d (e+f x)^m\right )}{x} \, dx}{f}\\ &=b m n x-m x \left (a+b \log \left (c x^n\right )\right )+\frac {(e+f x) \left (a+b \log \left (c x^n\right )\right ) \log \left (d (e+f x)^m\right )}{f}-\frac {(b n) \text {Subst}\left (\int \frac {x \log \left (d x^m\right )}{-\frac {e}{f}+\frac {x}{f}} \, dx,x,e+f x\right )}{f^2}\\ &=b m n x-m x \left (a+b \log \left (c x^n\right )\right )+\frac {(e+f x) \left (a+b \log \left (c x^n\right )\right ) \log \left (d (e+f x)^m\right )}{f}-\frac {(b n) \text {Subst}\left (\int \left (f \log \left (d x^m\right )-\frac {e f \log \left (d x^m\right )}{e-x}\right ) \, dx,x,e+f x\right )}{f^2}\\ &=b m n x-m x \left (a+b \log \left (c x^n\right )\right )+\frac {(e+f x) \left (a+b \log \left (c x^n\right )\right ) \log \left (d (e+f x)^m\right )}{f}-\frac {(b n) \text {Subst}\left (\int \log \left (d x^m\right ) \, dx,x,e+f x\right )}{f}+\frac {(b e n) \text {Subst}\left (\int \frac {\log \left (d x^m\right )}{e-x} \, dx,x,e+f x\right )}{f}\\ &=2 b m n x-m x \left (a+b \log \left (c x^n\right )\right )-\frac {b n (e+f x) \log \left (d (e+f x)^m\right )}{f}-\frac {b e n \log \left (-\frac {f x}{e}\right ) \log \left (d (e+f x)^m\right )}{f}+\frac {(e+f x) \left (a+b \log \left (c x^n\right )\right ) \log \left (d (e+f x)^m\right )}{f}+\frac {(b e m n) \text {Subst}\left (\int \frac {\log \left (1-\frac {x}{e}\right )}{x} \, dx,x,e+f x\right )}{f}\\ &=2 b m n x-m x \left (a+b \log \left (c x^n\right )\right )-\frac {b n (e+f x) \log \left (d (e+f x)^m\right )}{f}-\frac {b e n \log \left (-\frac {f x}{e}\right ) \log \left (d (e+f x)^m\right )}{f}+\frac {(e+f x) \left (a+b \log \left (c x^n\right )\right ) \log \left (d (e+f x)^m\right )}{f}-\frac {b e m n \text {Li}_2\left (1+\frac {f x}{e}\right )}{f}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.05, size = 152, normalized size = 1.30 \begin {gather*} \frac {-a f m x+2 b f m n x-b e m n \log (e+f x)-b e m n \log (x) \log (e+f x)+a e \log \left (d (e+f x)^m\right )+a f x \log \left (d (e+f x)^m\right )-b f n x \log \left (d (e+f x)^m\right )+b \log \left (c x^n\right ) \left (e m \log (e+f x)+f x \left (-m+\log \left (d (e+f x)^m\right )\right )\right )+b e m n \log (x) \log \left (1+\frac {f x}{e}\right )+b e m n \text {Li}_2\left (-\frac {f x}{e}\right )}{f} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Log[c*x^n])*Log[d*(e + f*x)^m],x]

[Out]

(-(a*f*m*x) + 2*b*f*m*n*x - b*e*m*n*Log[e + f*x] - b*e*m*n*Log[x]*Log[e + f*x] + a*e*Log[d*(e + f*x)^m] + a*f*
x*Log[d*(e + f*x)^m] - b*f*n*x*Log[d*(e + f*x)^m] + b*Log[c*x^n]*(e*m*Log[e + f*x] + f*x*(-m + Log[d*(e + f*x)
^m])) + b*e*m*n*Log[x]*Log[1 + (f*x)/e] + b*e*m*n*PolyLog[2, -((f*x)/e)])/f

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 9 vs. order 4.
time = 0.27, size = 1762, normalized size = 15.06

method result size
risch \(\text {Expression too large to display}\) \(1762\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*ln(c*x^n))*ln(d*(f*x+e)^m),x,method=_RETURNVERBOSE)

[Out]

-1/4*Pi^2*x*b*csgn(I*d)*csgn(I*d*(f*x+e)^m)^2*csgn(I*x^n)*csgn(I*c*x^n)^2-1/4*Pi^2*x*b*csgn(I*(f*x+e)^m)*csgn(
I*d*(f*x+e)^m)^2*csgn(I*c)*csgn(I*c*x^n)^2-x*a*m+2*b*m*n*x+m/f*e*ln(f*x+e)*b*ln(c)-m*b*ln(x^n)*x+ln(x^n)*ln(d)
*x*b-m*ln(c)*b*x+ln(d)*ln(c)*b*x-ln(d)*b*n*x+ln(d)*a*x+b*e*m*n/f+a*m/f*e*ln(f*x+e)+(b*x*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d*(f*x+e)^m)^2*csgn(I*c*x^n)^3-
1/2*I*ln(x^n)*Pi*x*b*csgn(I*d)*csgn(I*(f*x+e)^m)*csgn(I*d*(f*x+e)^m)+1/4*Pi^2*x*b*csgn(I*d)*csgn(I*(f*x+e)^m)*
csgn(I*d*(f*x+e)^m)*csgn(I*c)*csgn(I*c*x^n)^2+1/4*Pi^2*x*b*csgn(I*d)*csgn(I*(f*x+e)^m)*csgn(I*d*(f*x+e)^m)*csg
n(I*x^n)*csgn(I*c*x^n)^2+1/2*I*Pi*b*n*x*csgn(I*d)*csgn(I*(f*x+e)^m)*csgn(I*d*(f*x+e)^m)-1/4*Pi^2*x*b*csgn(I*(f
*x+e)^m)*csgn(I*d*(f*x+e)^m)^2*csgn(I*x^n)*csgn(I*c*x^n)^2-1/4*Pi^2*x*b*csgn(I*d*(f*x+e)^m)^3*csgn(I*c)*csgn(I
*x^n)*csgn(I*c*x^n)-1/2*I*Pi*b*n*x*csgn(I*d)*csgn(I*d*(f*x+e)^m)^2-1/2*I*Pi*b*n*x*csgn(I*(f*x+e)^m)*csgn(I*d*(
f*x+e)^m)^2-1/2*I*m/f*e*ln(f*x+e)*Pi*b*csgn(I*c)*csgn(I*x^n)*csgn(I*c*x^n)

________________________________________________________________________________________

Maxima [A]
time = 0.38, size = 193, normalized size = 1.65 \begin {gather*} \frac {{\left (\log \left (f x e^{\left (-1\right )} + 1\right ) \log \left (x\right ) + {\rm Li}_2\left (-f x e^{\left (-1\right )}\right )\right )} b m n e}{f} - \frac {{\left ({\left (m n - m \log \left (c\right )\right )} b - a m\right )} e \log \left (f x + e\right )}{f} - \frac {b m n e \log \left (f x + e\right ) \log \left (x\right ) + {\left ({\left (f m - f \log \left (d\right )\right )} a - {\left (2 \, f m n - f n \log \left (d\right ) - {\left (f m - f \log \left (d\right )\right )} \log \left (c\right )\right )} b\right )} x - {\left (b f x \log \left (x^{n}\right ) - {\left ({\left (f n - f \log \left (c\right )\right )} b - a f\right )} x\right )} \log \left ({\left (f x + e\right )}^{m}\right ) - {\left (b m e \log \left (f x + e\right ) - {\left (f m - f \log \left (d\right )\right )} b x\right )} \log \left (x^{n}\right )}{f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))*log(d*(f*x+e)^m),x, algorithm="maxima")

[Out]

(log(f*x*e^(-1) + 1)*log(x) + dilog(-f*x*e^(-1)))*b*m*n*e/f - ((m*n - m*log(c))*b - a*m)*e*log(f*x + e)/f - (b
*m*n*e*log(f*x + e)*log(x) + ((f*m - f*log(d))*a - (2*f*m*n - f*n*log(d) - (f*m - f*log(d))*log(c))*b)*x - (b*
f*x*log(x^n) - ((f*n - f*log(c))*b - a*f)*x)*log((f*x + e)^m) - (b*m*e*log(f*x + e) - (f*m - f*log(d))*b*x)*lo
g(x^n))/f

________________________________________________________________________________________

Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))*log(d*(f*x+e)^m),x, algorithm="fricas")

[Out]

integral((b*log(c*x^n) + a)*log((f*x + e)^m*d), x)

________________________________________________________________________________________

Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*ln(c*x**n))*ln(d*(f*x+e)**m),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))*log(d*(f*x+e)^m),x, algorithm="giac")

[Out]

integrate((b*log(c*x^n) + a)*log((f*x + e)^m*d), x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \ln \left (d\,{\left (e+f\,x\right )}^m\right )\,\left (a+b\,\ln \left (c\,x^n\right )\right ) \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(log(d*(e + f*x)^m)*(a + b*log(c*x^n)),x)

[Out]

int(log(d*(e + f*x)^m)*(a + b*log(c*x^n)), x)

________________________________________________________________________________________